<?php
namespace Admin\Controller;
use Think\Controller;
class TestController extends Controller {

    public function _initialize(){
        $auth = new \Think\Auth();
        $User_Info = session('UserInfo');
        if($User_Info['name']!='admin'){
            if(MODULE_NAME != 'Admin' || CONTROLLER_NAME != 'Index' || ACTION_NAME != 'index'){
                if(!$auth->check(MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME,session('uid'))){
                   echo '没有权限';exit;
                }
            }
        }
    }

	public function index(){
		echo 'admin/test/index';
	}

	public function index2(){
		echo 'admin/test/index2';
	}
}